<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<jsp:include page="head.htm" />
<link rel="stylesheet" type="text/css" href="css/style1.css" />
</head>
<body>
	<img src="images/hitch_banner.jpg"/>
	<div id="head">
		<h1>Hitch</h1>
	</div>
	<div id="content">
		<%@ include file="menu.jsp" %>
		<form:form method="post" action="searchtour.html"
			modelAttribute="tour">
			<fieldset>
				<form:errors path="*" element="div" />
				<fieldset>
					<label for="start_date">Start date:</label>
					<form:input path="start_date" />
					<form:errors path="start_date" element="div" cssClass="error" />
				</fieldset>
				<fieldset>
					<label for="end_date">End date:</label>
					<form:input path="end_date" />
					<form:errors path="end_date" element="div" cssClass="error" />
				</fieldset>

				<fieldset>
					<div class="form-buttons">
						<div class="button">
							<input name="search" id="submit" type="submit"
								value="<fmt:message key="button.search"/>"> </input>
						</div>
					</div>
				</fieldset>


				<table>
					<colgroup>
						<col />
						<col />
						<col />
						<col />
						<col />
						<col />
						<col />
					</colgroup>
					<thead>
						<tr>
							<th>Start Date</th>
							<th>End Date</th>
							<th>Min seats</th>
							<th>Max seats</th>
							<th>Description</th>
							<th>Owner</th>
							<th>Preferences</th>
						</tr>
					</thead>
					<tbody>
						<c:forEach items="${tourValues}" var="tmpTour">
							<tr>
								<td><c:out value="${tmpTour.start_date}" /></td>
								<td><c:out value="${tmpTour.end_date}" /></td>
								<td><c:out value="${tmpTour.min_member_count}" /></td>
								<td><c:out value="${tmpTour.max_member_count}" /></td>
								<td><c:out value="${tmpTour.description}" /></td>
								<td><c:out value="${tmpTour.user.username}" /></td>
								<td><a href="touroperations.html?id=${tmpTour.id}">operationsWithTour
								</a></td>
							</tr>
						</c:forEach>
					</tbody>
				</table>
			</fieldset>
		</form:form>


	</div>
</body>
</html>
